In [ ]:
for radek in range(4):
radek += 1
for value in range(radek):
print('X', end=' ')
print('')
In [ ]:
for radek in range(1, 5):
print('X ' * radek)
In [ ]:
promenna = "X"
for j in range(5):
for i in promenna:
print(i, i, i, i, i)
In [ ]:
for j in range(5):
print('X ' * 5)
In [ ]:
for X_sloupce in range (6):
print ('')
for X_radky in range (6):
if X_radky == 0 or X_radky == 5 or X_sloupce == 0 or X_sloupce == 5:
print ('X', end = ' ')
else:
print (' ', end = ' ')
In [ ]:
for x in range(6):
if x % 5 == 0:
print('X ' * 6)
else:
print('X ', ' ' * 6, 'X')
In [ ]:
ctverec = input("Když napíšeš podelně, vypíšes z x část čtverce")
if ctverec == "podelne":
print(" x"*5, sep=" ")
for i in range(5):
print(" x"," "," x")
print(" x"*5, sep=" ")